package day20210126;

import org.junit.Test;

/*
* 9. 回文数
* */
public class Palindrome {

    @Test
    public void test01() {
        int x = 1001 ;
        int y = x , digits , newNum = 0 ;
        while (y>0) {
            digits = y % 10;
            y /= 10 ;
            newNum = (newNum * 10 ) + digits ;
        }
        System.out.println(x == newNum);
    }
}
